package seventhquestion;

import java.io.*;
import java.net.Socket;

public class ThreadSocket implements Runnable{
    Socket socket;

    public ThreadSocket(Socket socket) {
        this.socket = socket;
    }

    @Override
    public void run() {
        BufferedReader br = null;
        PrintWriter pw = null;
        try {
            br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            pw = new PrintWriter(socket.getOutputStream());

            String str=null;
            while ((str=br.readLine())!=null){
                pw.println();
            }

        }catch (IOException e){
            e.printStackTrace();
        }finally {

        }

    }
}
